

// import Home from '../pages/home/index'
// import Homes from '../pages/homes/index'
// import Order from '../pages/order/index'
// import My from '../pages/my/index'

import { lazy } from "react"

import { Navigate } from "react-router-dom";
    const  Home =lazy(()=>import('../pages/home'))
     const  Homes =lazy(()=>import('../pages/homes'))
      const  Order =lazy(()=>import('../pages/order'))
       const  My =lazy(()=>import('../pages/my'))
export const menu=[
    {
        path:'/home/homes',
        element:<Homes/>,
        title:'首页'
    },
    {
        path:'/home/order',
        element:<Order/>,
        title:'订单'
    },
    {
        path:'/home/my',
        element:<My/>,
        title:'我的'
    },
]
const router=[
    {
        path:'/',
        element:<Navigate to="/home/homes"/>
    },
    {
        path:'/home',
        element:<Home/>,
        children:menu
    }
]

export default router